package behavior.memento;

import java.util.ArrayList;
import java.util.List;

/**
 * @author dali
 * @date 2021-07-27 16:53
 * @Description 管理类用于存档、读档
 */

public class CareTaker {
    private List<Memento> memento= new ArrayList<>();

    public void saveMemento(Memento memento) {
        this.memento.add(memento);
    }

    public Memento getMemento(int index) {
        return this.memento.get(index);
    }
}
